package com.hhc.controller.app_master;

import com.alibaba.fastjson.JSONObject;
import com.hhc.model.AppMaster;
import com.hhc.model.ApplianceMaster;
import com.hhc.model.ApplianceMasterExt;
import com.hhc.service.AppMasterService;
import com.hhc.service.ApplianceMasterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/appMaster")
public class AppMasterController {
    @Autowired
    private AppMasterService appMasterService;

    @RequestMapping(value = "/queryCurrentVersion", method = RequestMethod.POST)
    @ResponseBody
    public JSONObject queryCurrentVersion(@RequestBody String data) {
        JSONObject jsonObject;
        AppMaster appMaster = JSONObject.parseObject(data, AppMaster.class);
        jsonObject = appMasterService.queryCurrentVersion(appMaster);
        return jsonObject;
    }
}
